<template>
	<!-- <view class="form"> -->
	<view class="formINFO">
	<u--form labelPosition="left" :model="formModel" ref="form1" label-width="200rpx">
		<u-form-item label="作业名称" prop="zymc" borderBottom>
		  <u--input v-model="name" :disabled="true" placeholder="输入作业名称" border="none" >
		  </u--input>
		</u-form-item>
		<u-form-item label="作业区域" prop="zymc" borderBottom>
		  <u--input v-model="zyqy" :disabled="true" placeholder="输入作业区域" border="none" >
		  </u--input>
		</u-form-item>
		<u-form-item label="监护人" prop="zymc" borderBottom>
		  <u--input v-model="jhrName" :disabled="true" placeholder="输入监护人" border="none" >
		  </u--input>
		</u-form-item>
		<u-form-item label="验收人" prop="zymc" borderBottom>
		  <u--input v-model="ysrName" :disabled="true" placeholder="输入验收人" border="none" >
		  </u--input>
		</u-form-item>
	  <u-form-item :label="item.name" prop="zymc" borderBottom v-for="item in formList" :key="item.name">
		<u--input v-if="typeof item.value ===  'string'" v-model="item.value" :disabled="true" placeholder="输入作业名称" border="none" >
		</u--input>
		<image v-else v-for="(i, index) in item.value" :src="i.url" style="width:100%;height:200rpx;" alt=""></image>
	  </u-form-item>
			<!-- <u-form-item label="作业区域" prop="zyqyName" borderBottom @click="show=true;">
				<u--input v-model="formModel.zyqyName" placeholder="输入作业区域" border="none" disabled disabledColor="#ffffff">
				</u--input>
				<u-icon slot="right" name="arrow-right"></u-icon>
			</u-form-item> -->
      <!-- <user-pick :label="'监护人'" :multiple="false" :title="'监火人'" :placeholder="'请选择监火人'"
                 v-model="formModel.jhr" :prop="'jhr'"></user-pick>
      <user-pick :label="'验收人'" :multiple="false" :title="'验收人'" :placeholder="'请选择验收人'"
                 v-model="formModel.ysr" :prop="'ysr'"></user-pick>
			<u-action-sheet :show="show" :actions="qywzOptions" title="作业区域" @close="show = false" @select="sexSelect">
			</u-action-sheet> -->
		</u--form>
		<!-- <u-button type="primary" @click="submit" text="下一步"></u-button> -->
		<!-- <base-form v-model="formModel" :labelWidth="100" :formList="formList" :btnMessage="btnMessage" @submit="submit"> -->
			<!-- <view slot="testSlot"> 这里可以是一个未定义的组件 </view>
			  <view slot="testSlot1"> 这里可以是一个未定义的组件1 </view> -->
		<!-- </base-form> -->

	</view>
	<!-- </view> -->
</template>

<script>
	import userPick from "@/pages/Components/userPick";
	import deptPick from "@/pages/Components/department";
	import {
		workHeaderAPI,
		getData
	} from "../../../api/public.js";
	import {
		URL
	} from "../../../api/request.js";
	import {
		zyqy
	} from "../../../api/api.js";
	export default {
		props: ["type","formList","ysrName","jhrName","name","zyqy"],
		components: {
			userPick,
			deptPick,
		},
		data() {
			return {
				// type: 1,
				companyId: null,
				companyIds: 320310110,
				// formList: [],
				formModel: {
          zymc:'',
          ysr:''
        },
				isShow: 1,
				btnMessage: {
					state: false,
					cancels: "上一步",
					submit: "下一步",
				},
				options1: [],
				value: "",
				model1: {
					name: "",
				},
				men: [],
				dataUrl: null,
				data2: {},
				show:false,
				qywzOptions:[],
				obj:null
			};
		},
		onShow(obj) {
			this.companyId = uni.getStorageSync("companyId");
			// console.log(this.companyId);
			// this.getOutInfo()
			// this.obj = JSON.parse(obj.details)
			// console.log(111,this.obj)
			// this.formList = JSON.parse(this.obj)
			// console.log(this.formList,'eqwe');

		},
		mounted() {
			// this.init();
			// this.getZyqy()
		},
		methods: {
			
		submit() {
        this.$emit("submit");
			},
		},
	};
</script>

<style lang="scss">
	.form {
		height: 100vh;
		overflow-y: auto;
		background: #f6f6f6;
		padding: 60rpx 30rpx;

		.formINFO {
			box-sizing: border-box;
			padding: 0 25rpx;
			border-radius: 8px;
			background: #fff;
		}

		.identification {
			width: 100%;
			height: 1220rpx;
			background-color: #fff;
			border-radius: 16rpx;
			padding: 0 25rpx;
			box-sizing: border-box;

			.title {
				width: 100%;
				height: 90rpx;
				background-color: skyblue;
				// margin: auto 0;
				display: flex;

				.left {
					width: 200rpx;
				}

				.right {
					flex: 1;
				}
			}

			.content {
				width: 100%;
				height: 1018rpx;
				background-color: #f6f6f6;
			}
			
			.u-button{
				margin: 20rpx 0;
			}
		}
	}
</style>
